import { Context } from '@/pages/test/useContext';
import React, { useContext } from 'react';

function Child() {
  // @ts-ignore
  const { n, setN } = useContext(Context);
  const onClick = () => {
    setN((i: number) => i + 1.5);
  };
  return (
    <div>
      我是儿子 我得到的 n: {n}
      <button onClick={onClick}>+1.5</button>
    </div>
  );
}

export default Child;
